//窗口大小改变之后设置html字体大小  视口的宽度/20 = html字体大小
function setRem(){
    console.log("====");
    let clientWidth = document.documentElement.clientWidth; //获取视口的宽度

    let htmlDom = document.documentElement;

    htmlDom.style.fontSize = clientWidth/20 + 'px';
}

setRem();

window.onresize = setRem; 

